import request from '@/utils/request'


export function getDevice(deviceId) {
  return request({
    url: `/api/device/device/${deviceId}?deviceId=${deviceId}`, 
    method: 'get'
  })
}

//设备-tab列表
export function postDeviceFind(data) {
  return request({
    url: '/api/device/device/find', 
    method: 'post',
    data
  })
}

export function postDeviceCommand(data) {
  return request({
    url: '/api/device/device/command', 
    method: 'post',
    data
  })
}

export function postDeviceUnlock(data) {
  return request({
    url: '/api/device/device/unlock', 
    method: 'post',
    data
  })
}

export function postDevice(data) {
  return request({
    url: '/api/device/device', 
    method: 'post',
    data
  })
}

export function putDevice(deviceId,data) {
  return request({
    url: `/api/device/device/${deviceId}`, 
    method: 'put',
    data
  })
}

export function deleteDevice(deviceId) {
  return request({
    url: `/api/device/device/${deviceId}`, 
    method: 'delete'
  })
}


